package quest.event
{
import flash.events.Event;

import values.events.QuestValueEvent;
import values.quest.QuestValue;

/**
 * QuestEventHandlerBase
 * @author jliang
 * 
 */
public class QuestEventHandlerBase implements IQuestEventHandler
{
	//==========================================================================
	//  Constructor
	//==========================================================================
	public function QuestEventHandlerBase()
	{
	}
	//==========================================================================
	//  Properties
	//==========================================================================
	private var _data:QuestValue;
	
	public function set data(questValue:QuestValue):void
	{
		_data = questValue;
		
		data.addEventListener(QuestValueEvent.APPEAR, appearHandler);
		data.addEventListener(QuestValueEvent.ACCEPT, accpetHandler);
		data.addEventListener(QuestValueEvent.VIEW_DETAIL, viewDetailHandler);
		data.addEventListener(QuestValueEvent.PROGRESS, progressHandler);
		data.addEventListener(QuestValueEvent.COMPLETE, completeHandler);
	}
	
	public function get data():QuestValue
	{
		return _data;
	}
	
	public function dispose():void
	{
		data.removeEventListener(QuestValueEvent.APPEAR, appearHandler);
		data.removeEventListener(QuestValueEvent.ACCEPT, accpetHandler);
		data.removeEventListener(QuestValueEvent.VIEW_DETAIL, viewDetailHandler);
		data.removeEventListener(QuestValueEvent.PROGRESS, progressHandler);
		data.removeEventListener(QuestValueEvent.COMPLETE, completeHandler);
	}
	//==========================================================================
	//  Event handlers
	//==========================================================================
	protected function appearHandler(event:Event):void
	{
		
	}
	
	protected function accpetHandler(event:Event):void
	{
		
	}
	
	protected function viewDetailHandler(event:Event):void
	{
		
	}
	
	protected function progressHandler(event:Event):void
	{
		
	}
	
	protected function completeHandler(event:Event):void
	{
		
	}
}
}


